/PROG  PNS0004
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "P0055168  OK";
PROG_SIZE	= 3322;
CREATE		= DATE 22-06-10  TIME 08:48:28;
MODIFIED	= DATE 25-07-04  TIME 11:22:06;
FILE_NAME	= PNS0071;
VERSION		= 0;
LINE_COUNT	= 117;
MEMORY_SIZE	= 3790;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: R23 ;
   6:  !  PROGRAM: PNS0004 ;
   7:  !  PART:P0055168 ;
   8:  !******************************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  OVERRIDE=20% ;
  12:  MOVE TO HOME    ;
  13:  R[14]=75    ;
  14:  R[18]=1    ;
  15:  R[19]=.1    ;
  16:   ;
  17:  !------------------------------- ;
  18:  !BEGINNING OF PROGRAM ;
  19:  CALL PARTDROP    ;
  20:  COL GUARD ADJUST R[14] ;
  21:  UTOOL_NUM=1 ;
  22:  UFRAME_NUM=0 ;
  23:  PAYLOAD[3] ;
  24:   ;
  25:  !INITIATE TO PICK-POUNCE ;
  26:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  27:J P[2:PICK POUNCE] 50% CNT100 ACC100    ;
  28:  R[1]=0    ;
  29:  TIMER[1]=RESET ;
  30:  TIMER[1]=START ;
  31:   ;
  32:  LBL[10:TOP OF LOOF] ;
  33:  OVERRIDE=R[5] ;
  34:   ;
  35:  TIMER[3]=STOP ;
  36:  TIMER[2]=STOP ;
  37:  R[1]=R[1]+1    ;
  38:  R[2]=TIMER[2]    ;
  39:  R[3]=60/R[2]    ;
  40:  R[8]=TIMER[3]    ;
  41:  TIMER[2]=RESET ;
  42:  TIMER[2]=START ;
  43:  TIMER[3]=RESET ;
  44:   ;
  45:  !PROCEED TO PICK ;
  46:  LBL[20] ;
  47:  IF DI[1]=ON AND DI[3]=ON AND DI[8]=ON,JMP LBL[25] ;
  48:  IF DI[29]=ON,JMP LBL[90] ;
  49:  JMP LBL[20] ;
  50:   ;
  51:  LBL[25] ;
  52:  WAIT DI[1]=ON AND DI[3]=ON AND DI[8]=ON    ;
  53:  TIMER[3]=START ;
  54:  OVERRIDE=R[5] ;
  55:J P[3:PICK APPROACH] 100% CNT100 ACC100    ;
  56:   ;
  57:J P[4:PICK] 100% CNT0 TB R[18]sec,CALL PARTPICK ACC100 BREAK    ;
  58:  PAYLOAD[4] ;
  59:  CALL CHK_PICK    ;
  60:  MONITOR Z_CHECH ;
  61:J P[5:PICK DEPART] 100% CNT75 ACC100 TA R[20]sec,DO[5]=PULSE,1.0sec    ;
  62:  DO[8]=PULSE,1.0sec ;
  63:  LBL[27] ;
  64:  CALL CHECKPICK    ;
  65:  IF DI[9]=OFF OR DI[11]=OFF,JMP LBL[27] ;
  66:   ;
  67:J P[7:PICK CLEAR] 100% CNT100 ACC100    ;
  68:  LBL[30:GOTO DROP POUNCE] ;
  69:J P[8:DROP POUNCE] 100% CNT100 ACC100 BREAK    ;
  70:  TIMER[3]=STOP ;
  71:  LBL[40:AT DROP POUNCE] ;
  72:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  73:  IF DI[7]=ON AND DI[2]=ON,JMP LBL[50] ;
  74:  IF DI[18]=ON,JMP LBL[60] ;
  75:  JMP LBL[40] ;
  76:   ;
  77:  LBL[50:MOVE DROP SNEAK] ;
  78:  TIMER[3]=START ;
  79:  OVERRIDE=R[5] ;
  80:J P[9:DROP SNEAK] 100% CNT50 ACC100 BREAK    ;
  81:  LBL[51:DROP OR C-P-S] ;
  82:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  83:  IF DI[18]=ON,JMP LBL[40] ;
  84:  JMP LBL[51] ;
  85:  JMP LBL[50] ;
  86:   ;
  87:  LBL[60:MOVE CLS-PRS-ACC] ;
  88:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  89:  PAUSE ;
  90:  JMP LBL[30] ;
  91:   ;
  92:  LBL[80:DROP ENABLED] ;
  93:  !PROCEED TO DROP ;
  94:  TIMER[3]=START ;
  95:  OVERRIDE=R[5] ;
  96:J P[10:DROP APPROACH] 100% CNT50 ACC100    ;
  97:  MONITOR END Z_CHECH ;
  98:J P[11:DROP] 100% CNT5 TB R[19]sec,CALL PARTDROP ACC100    ;
  99:  DO[6]=PULSE,1.0sec ;
 100:  PAYLOAD[3] ;
 101:  CALL CHK_DROP    ;
 102:   ;
 103:J P[12:DROP DEPART] 100% CNT100 ACC130    ;
 104:  DO[7]=PULSE,1.0sec ;
 105:J P[13:DROP CLEAR] 100% CNT100 ACC130    ;
 106:  !GOTO PICK POUNCE ;
 107:J P[2:PICK POUNCE] 100% CNT100 ACC100 BREAK    ;
 108:  IF DI[29]=ON,JMP LBL[90] ;
 109:  JMP LBL[10] ;
 110:   ;
 111:  LBL[90:END OF CYCLE] ;
 112:  TIMER[1]=STOP ;
 113:  R[4]=TIMER[1]    ;
 114:J P[1:MIDDLE] 50% CNT100    ;
 115:  MOVE TO HOME    ;
 116:   ;
 117:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2086.455  mm,	Y =     -.007  mm,	Z = -1251.280  mm,
	W =   180.000 deg,	P =     -.000 deg,	R =  -180.000 deg,
	E1=   107.700 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2105.211  mm,	Y =  1622.911  mm,	Z =  -994.433  mm,
	W =   179.250 deg,	P =      .620 deg,	R =   144.581 deg,
	E1=   141.990 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2646.859  mm,	Y =  3288.872  mm,	Z = -1164.736  mm,
	W =   179.015 deg,	P =     2.290 deg,	R =    90.153 deg,
	E1=   194.703 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2646.858  mm,	Y =  3288.872  mm,	Z = -1294.414  mm,
	W =   179.015 deg,	P =     2.290 deg,	R =    90.153 deg,
	E1=   194.703 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2646.859  mm,	Y =  3288.872  mm,	Z = -1164.736  mm,
	W =   179.015 deg,	P =     2.290 deg,	R =    90.153 deg,
	E1=   194.703 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2127.669  mm,	Y =  1747.575  mm,	Z = -1001.746  mm,
	W =   179.206 deg,	P =      .543 deg,	R =   141.529 deg,
	E1=   145.041 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2050.218  mm,	Y = -1223.864  mm,	Z =  -876.687  mm,
	W =  -178.974 deg,	P =      .706 deg,	R =  -151.848 deg,
	E1=    78.373 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2239.451  mm,	Y = -2549.168  mm,	Z =  -968.863  mm,
	W =  -179.599 deg,	P =    -2.557 deg,	R =  -129.015 deg,
	E1=    53.887 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2627.602  mm,	Y = -3227.838  mm,	Z =  -972.192  mm,
	W =   179.901 deg,	P =    -2.597 deg,	R =   -92.555 deg,
	E1=    17.502 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2627.602  mm,	Y = -3227.838  mm,	Z = -1188.591  mm,
	W =   179.901 deg,	P =    -2.597 deg,	R =   -92.555 deg,
	E1=    17.502 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2627.602  mm,	Y = -3227.837  mm,	Z = -1021.392  mm,
	W =   179.901 deg,	P =    -2.597 deg,	R =   -92.555 deg,
	E1=    17.502 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2126.270  mm,	Y = -1682.541  mm,	Z =  -966.499  mm,
	W =  -178.758 deg,	P =      .381 deg,	R =  -140.801 deg,
	E1=    67.319 deg
};
/END
